/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Universidad de La Frontera
 * License Type: Academic
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class PagoDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression pago_ID;
	public final StringExpression fecha;
	public final LongExpression monto_pagar;
	
	public PagoDetachedCriteria() {
		super(orm.Pago.class, orm.PagoCriteria.class);
		pago_ID = new IntegerExpression("pago_ID", this.getDetachedCriteria());
		fecha = new StringExpression("fecha", this.getDetachedCriteria());
		monto_pagar = new LongExpression("monto_pagar", this.getDetachedCriteria());
	}
	
	public PagoDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.PagoCriteria.class);
		pago_ID = new IntegerExpression("pago_ID", this.getDetachedCriteria());
		fecha = new StringExpression("fecha", this.getDetachedCriteria());
		monto_pagar = new LongExpression("monto_pagar", this.getDetachedCriteria());
	}
	
	public CuentaDetachedCriteria createCuentacuentaCriteria() {
		return new CuentaDetachedCriteria(createCriteria("cuentacuenta"));
	}
	
	public Pago uniquePago(PersistentSession session) {
		return (Pago) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Pago[] listPago(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Pago[]) list.toArray(new Pago[list.size()]);
	}
}

